<!--start of blog-->
<div class="post">

<table width=600>
  <tr>
    <td>
      <h3><b><%=@blog.title%></b></h3>   
    </td>
  </tr>
  <tr>
    <td height=20 valign="top"> <%=@blog.created_at.to_s(:chs)%> </td>
    </tr>
    <td> <div class="entry"> <%=@blog.content %> </div> </td>
    </tr>
    <tr>
      <td> 
        类别：<%=link_to category_name(@blog), category_link(@blog) %>
        <%=" | 评论(#{@blog.comments.size}) | 浏览(#{@blog.view_count})" %>)
      </td>
    </tr>
  </table>
  </div>
  <!--end of blog-->
  
  <!--comments list begins-->
  <div id="comments">
    <%@comments.each do |comment|%>
      <table width=600 >
        <tr bgcolor="#aabbaa">
          <td width=40%><b><%= comment.name %></b></td>
          <td width=40%><%=comment.created_at.to_s(:chs)%></td>
            <td width=20%>
              <%=link_to "删除", 
              :action=>:delete_comment, 
              :comment_id=>comment.id, 
              :id=>@blog.id%>
            </td>
          </tr>
          <tr bgcolor="#eeffee">
            <td colspan="2"><%=comment.content %></td>
          </tr>
        </table>
      <%end%>
      <%=will_paginate @comments,:blog_id=>@blog %>
    </div>
    <!--comments list ends-->